:root {
    --primary-color: #4CAF50;
    --hover-color: #45a049;
    --border-color: #ddd;
    --background-color: #f9f9f9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.upload-container {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background-color: var(--background-color);
    transition: border-color 0.3s;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.upload-container.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(76, 175, 80, 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}

.upload-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-button:hover {
    background-color: var(--hover-color);
}

.upload-hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.compression-options {
    margin: 2rem 0;
    display: flex;
    gap: 2rem;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.preview-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-preview {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: 4px;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-info {
    font-size: 0.9rem;
}

.image-info p {
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--background-color);
    border-radius: 4px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.compress-btn {
    width: 100%;
    padding: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.compress-btn:hover {
    background-color: var(--hover-color);
}

.compress-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 200px;
}

.compression-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: var(--background-color);
    border-radius: 4px;
    outline: none;
}

.compression-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.compression-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
    border: none;
}

.compression-slider::-webkit-slider-thumb:hover {
    background: var(--hover-color);
}

.compression-slider::-moz-range-thumb:hover {
    background: var(--hover-color);
}

.slider-value {
    font-size: 0.9rem;
    color: #666;
    min-width: 3em;
    text-align: center;
}

.compression-options {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    color: #fff;
}

.compression-settings, .format-settings {
    margin-bottom: 15px;
}

.compression-settings:last-child {
    margin-bottom: 0;
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.radio-label span {
    color: #fff;
}

.size-limit {
    display: flex;
    align-items: center;
    gap: 5px;
}

.size-limit input[type="number"] {
    width: 60px;
    padding: 2px 5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.size-limit input[type="number"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.size-limit input[type="number"]::-webkit-inner-spin-button,
.size-limit input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.size-limit input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.2);
}

.info-icon {
    color: rgba(255, 255, 255, 0.7);
    cursor: help;
    font-size: 14px;
}

.compress-btn {
    background-color: #1a73e8;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.compress-btn:hover {
    background-color: #1557b0;
}

.compress-btn:before {
    content: "⟲";
    font-size: 18px;
}

.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

@keyframes animateStars {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-2000px);
    }
}

#stars {
    width: 1px;
    height: 1px;
    background: transparent;
    box-shadow: generateStars(700); /* 这里会用 JS 动态生成 */
    animation: animateStars 100s linear infinite;
}

#stars2 {
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: generateStars(200); /* 这里会用 JS 动态生成 */
    animation: animateStars 150s linear infinite;
}

#stars3 {
    width: 3px;
    height: 3px;
    background: transparent;
    box-shadow: generateStars(100); /* 这里会用 JS 动态生成 */
    animation: animateStars 200s linear infinite;
} 